var vm = new Vue({
    el:"#app",
    data:{
        dept:'',
    },
    methods: {
        getDeptInfo: function () {
            let str = location.search;
            str = decodeURI(str);
            str = str.split("=")[1];
            axios({
                method:'post',
                url:'/dept/queryDeptInfo',
                params:{"deptName":str}
            }).then(function(result){
                vm.dept=result.data;
            }).catch(function (err) {
                console.log(err);
            })
        }
    },

    //页面加载完自动执行
    mounted(){
        this.getDeptInfo();
    }
})

function toDeptList(){
    location.href = "../../../../templates/sysManage/deptManage/deptList.html";
}